home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / game / role / oangband.lha / Oangband050b / help / macro.txt < prev    next >
Text File  |  2000-10-02  |  10KB  |  185 lines

  1.  
  2. ======================= Preferences, Macros and Keymaps  ======================
  3.  
  4.      Once you've played Angband for a while, you may decide to customize 
  5. commands and various other things to better suit your tastes.  
  6.      The first thing you'll discover a use for are keymaps and macros.  They 
  7. can be set up relatively easily, and allow you to perform common tasks with a 
  8. single keystroke.  Setting and changing ASCII (textual symbol) preferences 
  9. works similarly.
  10.      Some people also wind up editing user preference files directly, which 
  11. gives them considerable control over commands, graphics, and various other 
  12. things.
  13.  
  14.  
  15. === An Introduction to Macros and Keymaps ===
  16.  
  17.      Necromancers are forever casting spell "a", Magic Bolt, in spellbook 
  18. "a", Beginner's Curses.  In both keysets, that's "maa", plus "*" to enter 
  19. targeting mode, and finally "t" to target.  Wouldn't it be nice if you could 
  20. do all this with a single keypress?  
  21.      You can.  Choose an unused command (we shall pick "'" by way of example).
  22. Bring up the macro/keymap screen by typing "@".  Press "8" to create a keymap, 
  23. and the game will ask you for a keypress.  Type "'".  When you press Return, 
  24. you shift to the action field, where you input all the commands you want "'" 
  25. to perform when pressed.  In this case, you would enter:  "maa*t", and press 
  26. return.  Now save your new keymap by typing "6", and either allow the game to 
  27. choose your character's name for the preference file, or (if you want all of 
  28. your characters to use the same keymap) save to "user.prf".
  29.  
  30.      This is only the beginning.  What you can do with a spell, you can do 
  31. with arrows, Rods of Trap Location, resting, activating the Phial, searching; 
  32. all sorts of command combinations can profitably be keymapped.  Keymaps are 
  33. even more flexible when used in combination with object inscriptions - see the 
  34. help file "objs-mon.txt".
  35.  
  36.  
  37. ----------
  38.  
  39. Note:  The remainder of this file has not been modified for Oangband (but 
  40. the information in it should be fairly reliable anyway).
  41.  
  42. === User Pref Files ===
  43.  
  44.         Angband allows you to change various aspects of the game to suit
  45. your tastes.  You may define keymaps (changing the way Angband maps your
  46. keypresses to underlying commands), create macros (allowing you to map a
  47. single keypress to a series of keypresses), modify the visuals (allowing
  48. you to change the appearance of monsters, objects, or terrain features),
  49. change the colors (allowing you to make a given color brighter, darker,
  50. or even completely different), or set options (turning them off or on).
  51.  
  52.         Angband stores your preferences in files called "user pref files",
  53. which contain comments and "user pref commands", which are simple strings
  54. describing one aspect of the system about which the user has a preference.
  55. There are many ways to load a user pref file, and in fact, some of these
  56. files are automatically loaded for you by the game.  All of the files are
  57. kept in the "lib/user/" directory, though you may have to use one of the
  58. command line arguments to redirect this directory, especially on multi-user
  59. systems.  You may also enter single user pref commands directly, using the
  60. special "Enter a user pref command" command, activated by "double quote".
  61. You may have to use the "redraw" command (^R) after changing certain of
  62. the aspects of the game, to allow Angband to adapt to your changes.
  63.  
  64.         When the game starts up, after you have loaded an old character,
  65. or created a new character, some user pref files are loaded automatically.
  66. First, the "pref.prf" file is loaded.  This file contains some user pref
  67. commands which will work on all platforms.  Then one of "font-xxx.prf"
  68. (for normal usage) or "graf-xxx.prf" (for bitmap usage) is loaded.  These
  69. files contain attr/char changes to allow the monsters, objects, and/or
  70. terrain features to look "better" on your system.  Then the "pref-xxx.prf"
  71. file is loaded.  This file contains pre-defined system specific stuff
  72. (macros, color definitions, etc).  Then, the "user-xxx.prf" file is loaded.
  73. This file contains user-defined system specific stuff.  The "user-xxx.prf"
  74. file is used as the "default" user pref file in many places.  The "xxx" is
  75. the "system suffix" for your system, taken from the "main-xxx.c" file which
  76. was used to generate your executable.  Finally, the "Race.prf", "Class.prf",
  77. and "Name.prf" files are loaded, where "Race", "Class", and "Name" are
  78. replaced by the actual race, class, and name of the current character.
  79.  
  80.         Several commands allow you to both load existing user pref files,
  81. create new user pref files, append information to existing user pref files,
  82. and/or interact with various of the user preferences in a more intuitive
  83. way than the user pref commands allow.  The commands include "Interact with
  84. macros" (@), "Interact with visuals" (%), and "Interact with colors" (&),
  85. described below.
  86.  
  87.  
  88. --- User Pref Files (Macros) ---
  89.  
  90.         The "Interact with macros" command allows you to define or remove
  91. "macros", which are mappings from a single logical keypress to a sequence
  92. of keypresses, allowing you to use special keys on the keyboard, such as
  93. function keys or keypad keys, possibly in conjunction with modifier keys,
  94. to "automate" repetitive multi-keypress commands that you use a lot.
  95.  
  96.         Since macros represent keypress sequences, and not all keypresses
  97. have a printable representation, macro triggers and actions must often be
  98. "encoded" into a human readable form.  This is done using several types
  99. of encoding, including "\xHH" for character number HH in hexadecimal, "\e"
  100. for the "escape" code, "\n" for the "newline" code, "\r" for the "return"
  101. code, "\s" for the "space" code, "\\" for backslash, "\^" for caret, and
  102. "^X" for the code for any "control" key "ctrl-X".  Note that the "action"
  103. of a macro will not be checked against other macro triggers (unless the
  104. macro action contains a "control-backslash"), so you cannot make infinite
  105. loops.  You may specify extremely long macros, but you are limited in
  106. length by the underlying input mechanisms, which in general limit you
  107. to about 1024 keys in both triggers and actions.
  108.  
  109.         The special "\" command (which must be encoded in macros as "\\")
  110. is very useful in macros, since it bypasses all keymaps and allows the next
  111. keystroke to be considered a command in the underlying Angband command set.
  112. For a list of the Angband command set, see the "cmdlist.txt" help file.
  113. For example, a macro which maps Shift-KP6 to "\" + "." + "6" will induce
  114. the "run east" behavior, regardless of what keyset the user has chosen, and
  115. regardless of what keymaps have been defined.
  116.  
  117.     Macros can be specified in user pref files as a pair of lines, one
  118. of the form "A:<str>", which defines the encoded macro action, and one of
  119. the form "P:<str>", which defines the encoded macro trigger.
  120.  
  121.  
  122. --- User Pref Files (Keymaps) ---
  123.  
  124.         The "Interact with macros" command also allows you to define
  125. "keymaps", which are vaguely related to macros.  A keymap maps a single
  126. keypress to a series of keypresses, which bypass both other keymaps and
  127. any macros.  Angband uses keymaps to map the original and the roguelike
  128. keysets to the underlying command set, and allows the user to modify or
  129. add keymaps of their own.  Note that all keymap actions must be specified
  130. using underlying commands, not keypresses from the original or roguelike
  131. keysets.  The original keyset is almost identical to the underlying keyset,
  132. except that "numbers" are mapped to ";" plus a direction, "5" is mapped to
  133. ",", and a few control-keys are mapped to various things.  See "command.txt"
  134. for the full set of underlying commands.  Some uses for keymaps include the
  135. ability to "disable" a command by mapping it to "\x00", 
  136.  
  137.     Keymaps can be specified in user pref files as lines of the form
  138. "M:<T> <key> <str>", where <T> is the keyset (0/1 for original/roguelike),
  139. <key> is the encoded trigger key, and <str> is the encoded keymap action.
  140.  
  141.  
  142. --- User Pref Files (Visuals) ---
  143.  
  144.         You can use the "Interact with visuals" command to change various
  145. visual information, currently including the choice of what attr/char values
  146. are used to represent various monsters, objects, or terrain features.  Note
  147. that in combination appropriate support in "main-xxx.c", and with the use of
  148. the "use_graphics" flag, you may be able to specify that "graphic bitmaps"
  149. should be used instead of normal "colored characters" for various things.
  150.  
  151.         When interactively modifying the attr/char values for monsters,
  152. objects, or terrain features, pressing "n" or "N" will change which entry
  153. you are changing, pressing "a" or "A" will rotate through the available
  154. attr values, and pressing "c" or "C" will rotate though the available char
  155. values.  Note that attr/char values with the "high bit" set may induce the
  156. display of special "graphic" pictures if the "use_graphics" flag is set,
  157. and your system supports the "use_graphics" flag.
  158.  
  159.         Note that this command can be abused in various ways, and if you
  160. must do so, remember that you are only cheating yourself.
  161.  
  162.     Keymaps can be specified in user pref files as line of the form
  163. "R:<N>:<A>/<C>" or "K:<N>:<A>/<C>" or "F:<N>:<A>/<C>" or "U:<N>:<A>/<C>".
  164.  
  165.  
  166. --- User Pref Files (Colors) ---
  167.  
  168.         The "Interact with colors" command allows you to change the actual
  169. internal values used to display various colors.  This command may or may
  170. not have any affect on your machine.  Advanced machines may allow you to
  171. change the actual RGB values used to represent each of the 16 colors used
  172. by Angband, and perhaps even allow you to define new colors which are not
  173. currently used by Angband.
  174.  
  175.     Colors can be specified in user pref files as line of the form
  176. "V:<N>:<V>:<R>:<G>:<B>".
  177.  
  178.  
  179. --- User Pref Files (Options) ---
  180.  
  181.         The "Interact with options" command allows you to turn options
  182. on or off.  You may turn options off or on using the user pref commands
  183. of the form "X:<option>" or "Y:<option>" respectively.
  184.  
  185.